#pragma once

#include "cocos2d.h"

USING_NS_CC;

namespace GAMETEMPLATE
{
	enum TYPE
	{
		CHARACTER			= 0,
		ANIMATION			= 1,
		SCRIPT				= 2,
		MAX,
	};
}

class ITemplate : public CCObject
{
public:
	UINT id;
};

class CGameTemplate
{
public:
	void Init();
	static CGameTemplate* GetThis(){ return _this; };
	static void SetThis(CGameTemplate* newThis){ _this = newThis; }

	ITemplate* GetTemplate(GAMETEMPLATE::TYPE type, UINT id);
	void SetTemplate(GAMETEMPLATE::TYPE type, ITemplate* newTemplate);

private:
	vector< CCMutableDictionary<UINT, ITemplate*> > _templateList;
	static CGameTemplate* _this;
};



